package com.hongyuan.venue.data;

import java.util.HashMap;
import java.util.Map;

public class Constants {

    /*
    * Integer:接口code
    * String:接口名
    * */
    private Map<Integer,String> apis = new HashMap<>();

    private static Constants constants = null;

    private Constants(){
        addApis();
    }

    public static Constants getInstance(){
        if(constants == null){
            constants = new Constants();
        }
        return constants;
    }

    private void addApis(){
        apis.put(GET_TOKEN, "api_token");
        apis.put(MEMBERLOGIN, "memberlogin");
        apis.put(UPFILE_OSS, "upfile_oss");
        apis.put(UPFILE_OSS_MORE, "upfile_oss_more");
        apis.put(GET_MESSAGE_TOKEN, "get_token");
        apis.put(SEND_REGI_MSG, "send_regi_msg");
        apis.put(DO_FIND_PASSWORD, "do_find_password");
        apis.put(MEMBERLOGIN_DXM, "memberlogin_dxm");
        apis.put(CHECK_APP_VERSION, "check_app_version");
        apis.put(GET_MEMEBER_OS, "get_member_os");
        apis.put(GET_OFFLINE_STORE_INFO, "get_offline_store_info");
        apis.put(GYM_DETAIL, "gym_detail");
        apis.put(ALL_COUPON_LIST_GC, "all_coupon_list_gc");
        apis.put(COURSE_TRAIN_LIST, "course_train_list");
        apis.put(GYM_LIST, "gym_list");
        apis.put(GET_MEMBER_INDEX_INFO, "get_member_index_info");
        apis.put(GET_ONLINE_KF, "get_online_kf");
        apis.put(GET_PLAN_DATE, "get_plan_date");
        apis.put(GYM_RESERVE_LIST, "gym_reserve_list");
        apis.put(GETPREPAYORDER, "getPrePayOrder");
        apis.put(UNIFIEDORDER, "unifiedorder");
        apis.put(GYM_ORDER_LIST, "gym_order_list");
        apis.put(CANCEL_ORDER, "cancle_order");
        apis.put(GET_ORDER_INFO, "get_order_info");
        apis.put(ORDER_GYM_MX, "order_gym_mx");
        apis.put(USE_COUPON_LIST, "use_coupon_list");
        apis.put(OS_COUPON_LIST, "os_coupon_list");
        apis.put(GET_COUPON, "get_coupon");
        apis.put(MY_COUPON_LIST, "my_coupon_list");
        apis.put(UPDATE_MEMBER_HEAD, "update_member_head");
        apis.put(UPDATE_MEMBER_NAME, "update_member_name");
        apis.put(UPDATE_MEMBER_SEX, "update_member_sex");
        apis.put(UPDATE_MEMBER_BIRTH, "update_member_birth");
        apis.put(UPDATE_M_INFO, "update_m_info");
        apis.put(UPDATE_MEMBER_SIGN, "update_member_sign");
        apis.put(COURSE_TRAIN_DETAIL, "course_train_detail");
        apis.put(ORDER_COURSE_TRAIN, "order_course_train");
        apis.put(COURSE_TRAIN_ORDER_LIST, "course_train_order_list");
    }

    /*
     * 获取请求接口名
     * */
    public String getPath(int code){
        return apis.get(code);
    }

    /*==================================================================================*/

    //微信支付需要的appId
    public static final String APP_ID = "wx96322a2480850d96";

    /*================================接口code=======================================*/

    //token的获取
    public final static int  GET_TOKEN = 0x001;
    //登录接口
    public final static int  MEMBERLOGIN = 0x002;
    //单文件上传
    public final static int  UPFILE_OSS = 0x03;
    //多文件上传
    public final static int  UPFILE_OSS_MORE = 0x04;
    //获取手机验证码token
    public final static int  GET_MESSAGE_TOKEN = 0x005;
    //获取短信验证码
    public final static int  SEND_REGI_MSG = 0x006;
    //修改密码
    public final static int  DO_FIND_PASSWORD = 0x007;
    //验证码登录
    public final static int  MEMBERLOGIN_DXM = 0x008;
    //检查更新app
    public final static int  CHECK_APP_VERSION = 0x009;
    //获取门店
    public final static int  GET_MEMEBER_OS = 0x010;
    //获取门店详情
    public final static int  GET_OFFLINE_STORE_INFO = 0x011;
    //场馆详情
    public final static int  GYM_DETAIL = 0x012;
    //场馆优惠卷列表
    public final static int  ALL_COUPON_LIST_GC = 0x013;
    //场馆培训课
    public final static int  COURSE_TRAIN_LIST = 0x014;
    //场馆列表
    public final static int  GYM_LIST = 0x015;
    //个人中心
    public final static int  GET_MEMBER_INDEX_INFO = 0x016;
    //客服电话
    public final static int  GET_ONLINE_KF = 0x017;
    //时间轴
    public final static int  GET_PLAN_DATE = 0x018;
    //预约列表
    public final static int  GYM_RESERVE_LIST = 0x019;
    //微信支付
    public final static int  GETPREPAYORDER = 0x020;
    //支付宝支付
    public final static int  UNIFIEDORDER = 0x021;
    //获取我的订单
    public final static int  GYM_ORDER_LIST = 0x022;
    //取消订单
    public final static int  CANCEL_ORDER = 0x023;
    //订单详情
    public final static int  GET_ORDER_INFO = 0x024;
    //场馆预约订单
    public final static int  ORDER_GYM_MX = 0x025;
    //选中优惠卷
    public final static int  USE_COUPON_LIST = 0x026;
    //领卷中心
    public final static int  OS_COUPON_LIST = 0x027;
    //领取
    public final static int  GET_COUPON = 0x028;
    //
    public final static int  MY_COUPON_LIST = 0x029;
    //修改用户头像
    public final static int  UPDATE_MEMBER_HEAD = 0x030;
    //修改用户昵称
    public final static int  UPDATE_MEMBER_NAME = 0x031;
    //修改用户性别
    public final static int  UPDATE_MEMBER_SEX = 0x032;
    //修改用户生日
    public final static int  UPDATE_MEMBER_BIRTH = 0x033;
    //修改基本信息
    public final static int  UPDATE_M_INFO = 0x034;
    //修改个性签名
    public final static int  UPDATE_MEMBER_SIGN = 0x035;
    //培训课详情
    public final static int  COURSE_TRAIN_DETAIL = 0x036;
    //培训课订单
    public final static int  ORDER_COURSE_TRAIN = 0x037;
    //培训课订单列表
    public final static int  COURSE_TRAIN_ORDER_LIST = 0x038;

}
